<template>
  <el-header height="70px">
    <div>
      <img src="@/assets/img/subculture_laurel.gif" alt="" />
      <el-button type="warning" plain @click="leave">退出登录</el-button>
    </div>
  </el-header>
</template>

<script>
export default {
  methods: {
    leave() {
      sessionStorage.clear();
      this.$router.push("/login");
      this.$message({
        type: "success",
        message: "您已退出登录",
        duration: 3000,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.el-header {
  background-color: #000000;
  color: #333;
  padding-left: 0;
  > div {
    display: flex;
    justify-content: space-between;
    align-items: center; /* 挤在一起居中 */
    img {
      width: 120px;
      height: 70px;
    }
  }
}
</style>